# ntsyslog2

CPP  = i586-mingw32msvc-g++ -D__DEBUG__
CC   = i586-mingw32msvc-gcc -D__DEBUG__
RES  = 
OBJ  = engine.o event.o eventlog.o list.o ntsl.o safestr.o service.o $(RES)
LINKOBJ  = engine.o event.o eventlog.o list.o ntsl.o safestr.o service.o $(RES)
LIBS =  -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lws2_32   -g3 
INCS =   
CXXINCS =
BIN  = ntsyslog2.exe
CXXFLAGS = $(CXXINCS) -D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_CONSOLE -D_MBCS -DDEBUG   -DDEBUG -g3
CFLAGS = $(INCS) -D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_CONSOLE -D_MBCS -DDEBUG -D_DEBUG   -DDEBUG -g3
RM = rm -f

.PHONY: all all-before all-after clean clean-custom

all: all-before ntsyslog2.exe all-after


clean: clean-custom
	${RM} $(OBJ) $(BIN)

$(BIN): $(OBJ)
	$(CPP) $(LINKOBJ) -o "ntsyslog2.exe" $(LIBS)

engine.o: engine.c
	$(CC) -c engine.c -o engine.o $(CFLAGS)

event.o: event.c
	$(CC) -c event.c -o event.o $(CFLAGS)

eventlog.o: eventlog.c
	$(CC) -c eventlog.c -o eventlog.o $(CFLAGS)

list.o: list.c
	$(CC) -c list.c -o list.o $(CFLAGS)

ntsl.o: ntsl.c
	$(CC) -c ntsl.c -o ntsl.o $(CFLAGS)

safestr.o: safestr.c
	$(CC) -c safestr.c -o safestr.o $(CFLAGS)

service.o: service.c
	$(CC) -c service.c -o service.o $(CFLAGS)
